import type { DictData } from '@/api/modules/auth/dict.data';
import { useCloned } from '@vueuse/core';
import type { Rule } from 'ant-design-vue/es/form';

const formObj: DictData = {
  dictId: '',
  dictValue: '',
  dictName: '',
  dictType: '',
  dictSort: 0,
  status: '0',
};
export const form = ref({
  ...formObj,
});

export const formRef = ref();
export const resetForm = () => {
  form.value = {
    ...formObj,
  };
};
export const formRules: Record<keyof DictData, Rule[]> = {
  dictId: [],
  dictValue: [],
  dictName: [{ required: true }],
  dictType: [{ required: true }],
  dictSort: [{ required: true }],
  status: [],
};
